import service from '@/utils/request'
// eslint-disable-next-line no-unused-vars
const { httpPost, httpGet } = service
//---------------------------其他结算------------------------//
const request = {
    //获取其他结算分页数据
    getListOtherSettlementData (params) {
        return httpPost({
            url: '/projectsettle/otherSettlement/listByEntity',
            params
        })
    },
    //新增其他结算
    addOtherSettlementData (params) {
        return httpPost({
            url: '/projectsettle/otherSettlement/create',
            params
        })
    },
    //获取其他结算基本信息
    getOtherSettlementBasicInformationData (params) {
        return httpGet({
            url: '/projectsettle/otherSettlement/findById',
            params
        })
    },
    //获取汇总
    getOtherSettlementSummaryData (params) {
        return httpGet({
            url: '/projectsettle/otherSettlement/summary',
            params
        })
    },
    //获取其他结算明细
    getOtherSettlementDetailedData (params) {
        return httpGet({
            url: '/projectsettle/otherSettlement/listDtlsById',
            params
        })
    },
    //获取历史结算数据
    getOtherSettlementDetailedHistoryData (params) {
        return httpPost({
            url: '/projectsettle/otherSettlement/listSettlementDtlHistory',
            params
        })
    },
    //根据id删除其他结算
    deleteOtherSettlementData (params) {
        return httpGet({
            url: '/projectsettle/otherSettlement/delete',
            params
        })
    },
    //修改并保存其他结算基本信息
    updeteOtherSettlementData (params) {
        return httpPost({
            url: '/projectsettle/otherSettlement/update',
            params
        })
    },
    //修改并保存结算明细
    updeteOtherSettlementBasicInformationData (params) {
        return httpPost({
            url: '/projectsettle/otherSettlement/updateList',
            params
        })
    },
    //获取当前节点信息-可操作的按钮状态
    getButtonsTypeData (params) {
        return httpPost({
            url: '/projectsettle/flowEngin/getCurrentUnitInfo',
            params
        })
    },
    //获取审核历史
    getAuditHistoryData (params) {
        return httpPost({
            url: '/projectsettle/flowEngin/getAuditHistory',
            params
        })
    },
    //申请审核
    applicationReview (params) {
        return httpPost({
            url: '/projectsettle/flowEngin/commit',
            params
        })
    },
    //进行审核
    carryOutApplication (params) {
        return httpPost({
            url: '/projectsettle/flowEngin/audit',
            params
        })
    },
    //撤回审核申请
    withdrawApplication (params) {
        return httpPost({
            url: '/projectsettle/flowEngin/undoAudit',
            params
        })
    },
    //作废
    nullifyApplication (params) {
        return httpPost({
            url: '/projectsettle/common/nullify',
            params
        })
    },
    //获取当前单据期数
    getNextPeriod (params) {
        return httpGet({
            url: '/projectsettle/otherSettlement/getNextPeriod',
            params
        })
    },
    //获取获取审核中历史修改数据
    getUnderReviewHistoryData (params) {
        return httpGet({
            url: '/projectsettle/common/listFieldValueChangeHistoryInApprovalByBillId',
            params
        })
    },
    //更新审核中变更历史
    setUnderReviewHistoryData (params) {
        return httpPost({
            url: '/projectsettle/common/updateFieldValueChangeHistoryInApproval',
            params
        })
    },
    //根据合同中的乙方id获取对应外包方信息
    getSecondPartyData (params) {
        return httpPost({
            url: '/outer/outer/get/connect/outer',
            params
        })
    },
    // 验证外包方是否符合要求（过期、是不是D级）
    getSecondPartyState (params) {
        return httpGet({
            url: '/outer/outer/get/by/code/check/credit/code',
            params
        })
    },
    //获取施工日志工程量
    getListCanSettleQuantity (params) {
        return httpPost({
            url: '/projectsettle/otherSettlement/listCanSettleQuantity',
            params
        })
    },
    //获取截止上期末累计结算金额
    getPreviousTotalAmount (params) {
        return httpGet({
            url: '/projectsettle/otherSettlement/getPreviousTotalAmount',
            params
        })
    }
}
export default request